
package com.v1.video.domain;

import java.io.Serializable;

import com.v1.video.util.Utils;

public class ScenarioVideoInfo implements Serializable {
//    "videoId": "0000000873",
//    "sourceId": "",
//    "userId": "3485",
//    "videoUrl": "http://f01.shuaiwang.org:2080/group1/M00/00/13/rBAKtFORHLqAWVkkAAGe_eDGQ24953.mp4",
//    "imgUrl": "http://f01.shuaiwang.org:2080/group1/M00/00/13/rBAKtFORHLqAWVkkAAGe_eDGQ24953.jpg",
//    "detail": "帮助那些那些年那些没想看想看那些不足半辈子你在那年那种你们看看看看你们能农民起义",
//    "userName": "xiayu",
//    "create_time": "2014-06-06 16:39:00.0",
//    "address": "",
//    "title": "不再把那些年你的你",
//    "playNum": "5",
//    "praise": "0",
//    "comments": "0",
//    "forward": "0",
//    "userImg": "0",
//    "sex": "保密",
//    "state": "",
//    "stype": "1"
    
    public ScenarioVideoInfo(){
        
    }
    
    /**个人中心用到的VideoInfo与拍客 的对象转换*/
    public ScenarioVideoInfo(VideoInfo videoInfo){
        this.setVideoId(videoInfo.getVideoId());
        this.setVideoUrl(videoInfo.getVideoUrl());
        this.setImgUrl(videoInfo.getImgUrl());
        this.setDetail(videoInfo.getDetail());
        this.setCreate_time(videoInfo.getCreate_time());
        this.setUserId(videoInfo.getUserId());
        this.setUserName(videoInfo.getUserName());
        this.setUserImg(videoInfo.getUserImg());
        this.setSex(videoInfo.getSex());
    }
     
    public ScenarioVideoInfo(SearchVideoInfo videoInfo){
        this.setVideoId(videoInfo.getVideoId());
        this.setVideoUrl(videoInfo.getVideoUrl());
        this.setImgUrl(videoInfo.getImgUrl());
        this.setDetail(videoInfo.getDetail());
        this.setCreate_time(videoInfo.getCreate_time());
        this.setUserId(videoInfo.getUserId());
        this.setUserName(videoInfo.getUserName());
        this.setUserImg(videoInfo.getUserImg());
        this.setAddress(videoInfo.getRegion());
        this.setSex(videoInfo.getSex());
    }
    
    public ScenarioVideoInfo(MessageFocusInfo videoInfo){
        this.setVideoId(videoInfo.getVideoId());
        this.setDetail(videoInfo.getDetail());
        this.setUserId(videoInfo.getUserId());
        this.setUserName(videoInfo.getUserName());
        this.setUserImg(videoInfo.getUserImg());
    }
    
    /**
     * 新的视频详情与拍客 的对象转换
     * @param videoInfo
     */
    public ScenarioVideoInfo(VideoDetailInfoNew videoInfo){
    	
    	this.setVideoId(Integer.toString(videoInfo.getVideoId()));
        this.setVideoUrl(videoInfo.getVideoUrl());
        this.setImgUrl(videoInfo.getImgUrl());
        this.setDetail(videoInfo.getDetail());
        this.setCreate_time(Utils.getParseTime(videoInfo.getCreateTime()));
        this.setUserId(videoInfo.getUserInfo()==null?(videoInfo.getUserId()+""):videoInfo.getUserInfo().getUserId());
        this.setUserName(videoInfo.getUserInfo()==null?"":videoInfo.getUserInfo().getUserName());
        this.setUserImg(videoInfo.getUserInfo()==null?"":videoInfo.getUserInfo().getUserImg());
        this.setSex(videoInfo.getUserInfo()==null?"":videoInfo.getUserInfo().getSex());
    }
    
    /**
     * 3期的视频详情与拍客 的对象转换
     * @param videoInfo
     */
    public ScenarioVideoInfo(VideoDetailInfoNew3 videoInfo){
    	
    	this.setVideoId(Integer.toString(videoInfo.getVideoId()));
        this.setVideoUrl(videoInfo.getVideoUrl());
        this.setImgUrl(videoInfo.getImgUrl());
        this.setDetail(videoInfo.getDetail());
        this.setCreate_time(Utils.getParseTime(videoInfo.getCreateTime()));
        this.setUserId(""+videoInfo.getUserId());
        this.setUserName(videoInfo.getUserInfo().getUserName());
        this.setUserImg(videoInfo.getUserInfo().getUserImg());
        this.setSex(videoInfo.getUserInfo().getSex());
    }
    
    /**
     * 4.0的视频详情与拍客 的对象转换
     * @param videoInfo
     */
    public ScenarioVideoInfo(VideoDetailInfoNew4 videoInfo){
    	
    	this.setVideoId(videoInfo.getVideoId());
        this.setVideoUrl(videoInfo.getVideoUrl());
        this.setImgUrl(videoInfo.getImgUrl());
        this.setDetail(videoInfo.getDetail());
        this.setCreate_time(videoInfo.getCreateTime());
        this.setUserId(""+videoInfo.getUserId());
        this.setUserName(videoInfo.getUserInfo().getUserName());
        this.setUserImg(videoInfo.getUserInfo().getUserImg());
        this.setSex(videoInfo.getUserInfo().getSex());
    }
    
    
    /**
     * 新的视频详情与拍客 的对象转换
     * @param videoInfo
     */
    public ScenarioVideoInfo(String videoId){
    	this.setVideoId(videoId);
    }
    
    /**
     * 新的视频详情与拍客 的对象转换
     * @param videoInfo
     */
    public ScenarioVideoInfo(String videoId,String videoUrl){
    	this.setVideoId(videoId);
    	this.setVideoUrl(videoUrl);
    }
    
    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    private String videoId;

    private String videoUrl;

    private String imgUrl;

    private String detail;

    private String title;
    
    private String create_time;

    private String userId;

    private String userName;

    private String userImg; // 相对视频地址，需要使用接口地址

    private String address; // 地址

    private String sex;
    private String virtualAddress;

    public String getVideoId() {
        return videoId;
    }

    public void setVideoId(String videoId) {
        this.videoId = videoId;
    }

    public String getVideoUrl() {
        return videoUrl;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserImg() {
        return userImg;
    }

    public void setUserImg(String userImg) {
        this.userImg = userImg;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

	public String getVirtualAddress() {
		return virtualAddress;
	}

	public void setVirtualAddress(String virtualAddress) {
		this.virtualAddress = virtualAddress;
	}
    
}
